<!DOCTYPE html><html><head>
      <title>功能字段设置说明</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="yangshi.css">
      
      
      
      
      
      <style>
      code[class*=language-],pre[class*=language-]{color:#333;background:0 0;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.4;-moz-tab-size:8;-o-tab-size:8;tab-size:8;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:.8em;overflow:auto;border-radius:3px;background:#f5f5f5}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal;background:#f5f5f5}.token.blockquote,.token.comment{color:#969896}.token.cdata{color:#183691}.token.doctype,.token.macro.property,.token.punctuation,.token.variable{color:#333}.token.builtin,.token.important,.token.keyword,.token.operator,.token.rule{color:#a71d5d}.token.attr-value,.token.regex,.token.string,.token.url{color:#183691}.token.atrule,.token.boolean,.token.code,.token.command,.token.constant,.token.entity,.token.number,.token.property,.token.symbol{color:#0086b3}.token.prolog,.token.selector,.token.tag{color:#63a35c}.token.attr-name,.token.class,.token.class-name,.token.function,.token.id,.token.namespace,.token.pseudo-class,.token.pseudo-element,.token.url-reference .token.variable{color:#795da3}.token.entity{cursor:help}.token.title,.token.title .token.punctuation{font-weight:700;color:#1d3e81}.token.list{color:#ed6a43}.token.inserted{background-color:#eaffea;color:#55a532}.token.deleted{background-color:#ffecec;color:#bd2c00}.token.bold{font-weight:700}.token.italic{font-style:italic}.language-json .token.property{color:#183691}.language-markup .token.tag .token.punctuation{color:#333}.language-css .token.function,code.language-css{color:#0086b3}.language-yaml .token.atrule{color:#63a35c}code.language-yaml{color:#183691}.language-ruby .token.function{color:#333}.language-markdown .token.url{color:#795da3}.language-makefile .token.symbol{color:#795da3}.language-makefile .token.variable{color:#183691}.language-makefile .token.builtin{color:#0086b3}.language-bash .token.keyword{color:#0086b3}pre[data-line]{position:relative;padding:1em 0 1em 3em}pre[data-line] .line-highlight-wrapper{position:absolute;top:0;left:0;background-color:transparent;display:block;width:100%}pre[data-line] .line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}pre[data-line] .line-highlight:before,pre[data-line] .line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}pre[data-line] .line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}html body{font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ol,html body>ul{margin-bottom:16px}html body ol,html body ul{padding-left:2em}html body ol.no-list,html body ul.no-list{padding:0;list-style-type:none}html body ol ol,html body ol ul,html body ul ol,html body ul ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:700;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::after,html body code::before{letter-spacing:-.2em;content:'\00a0'}html body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:0 0;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:after,html body pre code:before,html body pre tt:after,html body pre tt:before{content:normal}html body blockquote,html body dl,html body ol,html body p,html body pre,html body ul{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body code,html body pre{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview ul{list-style:disc}.markdown-preview ul ul{list-style:circle}.markdown-preview ul ul ul{list-style:square}.markdown-preview ol{list-style:decimal}.markdown-preview ol ol,.markdown-preview ul ol{list-style-type:lower-roman}.markdown-preview ol ol ol,.markdown-preview ol ul ol,.markdown-preview ul ol ol,.markdown-preview ul ul ol{list-style-type:lower-alpha}.markdown-preview .newpage,.markdown-preview .pagebreak{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center!important}.markdown-preview:not([data-for=preview]) .code-chunk .code-chunk-btn-group{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .status{display:none}.markdown-preview:not([data-for=preview]) .code-chunk .output-div{margin-bottom:16px}.markdown-preview .md-toc{padding:0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link div,.markdown-preview .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}.markdown-preview .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0;min-height:100vh}@media screen and (min-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode]) .markdown-preview{font-size:14px!important;padding:1em}}@media print{html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for=html-export]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,.66);border:4px solid rgba(150,150,150,.66);background-clip:content-box}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc{padding:0 16px}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link{display:inline;padding:.25rem 0}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link div,html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper .md-toc-link p{display:inline}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc .md-toc .md-toc-link-wrapper.highlighted .md-toc-link{font-weight:800}html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 300px / 2);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for=html-export]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for=html-export]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
      <!-- The content below will be included at the end of the <head> element. --><script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function () {
    // your code here
  });
</script></head><body for="html-export">
    
    
      <div class="crossnote markdown-preview  ">
      
<p><span style="font-size: 32px; font-weight: bold;">目录</span></p>
<div class="code-chunk" data-id="code-chunk-id-0" data-cmd="toc"><div class="input-div"><div class="code-chunk-btn-group"><div class="run-btn btn btn-xs btn-primary"><span>▶︎</span></div><div class="run-all-btn btn btn-xs btn-primary">all</div></div><div class="status">running...</div></div><div class="output-div"></div></div><ul>
<li><a href="#1-%E7%AD%96%E7%95%A5%E7%BC%96%E5%86%99%E4%B8%8E%E5%AE%9E%E7%9B%98%E8%BF%90%E8%A1%8C%E7%9A%84%E4%B8%80%E4%BA%9B%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9">1、策略编写与实盘运行的一些注意事项</a></li>
<li><a href="#2-%E4%BA%A4%E6%98%93%E8%AE%BE%E7%BD%AEjiaoyishezhi%E5%88%97%E8%A1%A8%E6%AF%8F%E5%AD%97%E6%AE%B5%E5%90%AB%E4%B9%89">2、交易设置(jiaoyishezhi)列表每字段含义</a></li>
<li><a href="#3-%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD">3、其他功能</a></li>
<li><a href="#4-%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD2">4、其他功能2</a></li>
<li><a href="#5-%E8%A1%8C%E6%83%85%E6%BA%90%E9%80%89%E6%8B%A9">5、行情源选择</a></li>
<li><a href="#6-%E7%AE%97%E6%B3%95%E4%BA%A4%E6%98%93%E5%90%84%E7%A7%8D%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E">6、算法交易各种参数说明</a></li>
<li><a href="#7-%E6%89%B9%E9%87%8F%E4%B8%8B%E5%8D%95%E5%85%B6%E4%BB%96%E5%8A%9F%E8%83%BD%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E">7、批量下单其他功能参数说明</a></li>
<li><a href="#8-tick%E9%A9%B1%E5%8A%A8%E4%BC%A0%E5%85%A5%E7%9A%84tick%E6%95%B0%E6%8D%AE%E5%92%8Cgongju%E6%A8%A1%E5%9D%97duquredis_hq%E5%87%BD%E6%95%B0%E8%AF%BB%E5%8F%96%E7%9A%84tick%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F">8、tick驱动传入的tick数据和gongju模块DuquRedis_HQ函数读取的tick数据格式</a></li>
<li><a href="#9-%E4%BA%A4%E6%98%93%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9Etick%E6%95%B0%E6%8D%AE%E5%AD%97%E6%AE%B5%E8%AF%B4%E6%98%8E">9、交易接口返回tick数据字段说明</a></li>
</ul>
<hr>
<p><a href="https://www.bilibili.com/video/BV1nw411Y7uQ/" target="_blank" style="font-size:16
px;">视频教程</a></p>
<hr>
<h3 id="1-策略编写与实盘运行的一些注意事项">1、策略编写与实盘运行的一些注意事项 </h3>
<p>1.1、设置多账户同时在一个策略中交易时，在手工多账户下单时，账户与倍率必须对齐，账户编号填写必须按照账户设置表的顺序来，否则下单时账户编号对应的倍率会错乱,88站位编号也不能和实盘一起并排使用，否则编号对应的倍率会乱。<br>
1.2、写策略时，策略函数返回的第一个参数也就是第一个指标值设置成“w”，会屏蔽掉所有显示，在tick级别策略中可以提高策略运行效率。</p>
<hr>
<h3 id="2-交易设置jiaoyishezhi列表每字段含义">2、交易设置(jiaoyishezhi)列表每字段含义 </h3>
<pre data-role="codeBlock" data-info="python" class="language-python python"><code><span class="token punctuation">[</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">60</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">'IF2109'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">'IH'</span><span class="token punctuation">,</span> <span class="token string">'IC'</span><span class="token punctuation">,</span> <span class="token string">'IF'</span><span class="token punctuation">,</span> <span class="token string">'IM'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">18</span><span class="token punctuation">,</span> <span class="token string">'IF2112'</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">]</span><span class="token punctuation">,</span>  <span class="token string">'ruanjian2.0_taolixitong_v2_CFFEX.IF2109_30s'</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">]</span>
</code></pre><p>0，账户列表编号；<br>
1，账户对应倍率；如：工作区中填写 0,1|1,2,1 代表0号账户1倍下单，策略中发一单就下一单，2号账户为2倍，策略中发一单实际下两单；<br>
2，算法交易参数；详见：算法交易各种参数说明；<br>
3，交易合约；<br>
4，需要开平互转的合约；自动判断是否有今仓，有今仓者锁仓，应对日内手续费高，在设置中设置；<br>
5，策略参数；对应：策略中需要的参数，如均线参，macd参数等。注意第一位为一个开关，设置为大于0一般作为开仓数量设置，设置为&lt;=0者关闭这一行策略，关闭后不再计算策略，时间和最新价也不在更新，回测模式设置为&lt;=0也将关闭回测；<br>
6，策略名；策略名组成：软件名+策略函数名+数据合约+周期。策略名为此行策略的唯一标识，编写策略时可用于识别此行策略，批量下单时为“批量下单”标志，手工下单时为“手工下单”标志；<br>
7，是否开启开平互转，1为开启，0为关闭；<br>
8，其他功能。详见：其他功能每个参数说明；<br>
9，其他功能2。详见：其他功能2每个参数说明。</p>
<hr>
<h3 id="3-其他功能">3、其他功能 </h3>
<p>0，委托偏移跳数，可以为负数。参数含义：为委托偏移的跳数，负偏移为有利方向不易成交，正偏移为不利方向有利于成交；</p>
<p>1，是否需要初始化交易信号。参数含义：0为不需要初始化历史信号实盘，2为需要初始化历史信号实盘, 3为回测模式（不复权，具体合约也用这种模式），4为指数映射主连回测，第一个合约一定要加载主连合约，5为回测模式（复权），6为复权后的砖形图数据， 7为指数回测， 8为指数数据砖形图回测，9为跨周期指标计算专用，加载复权数据（只用于回测，实盘时请调为0）；</p>
<p>2，是否是收盘后运算交易信号。参数含义：1为每都计算一次信号，0为只k线收盘计算信号；<br>
3，下单价格基准，参数含义：0为最新价，1为对手价，2为排队价，3为指定价。</p>
<hr>
<h3 id="4-其他功能2">4、其他功能2 </h3>
<p>0，平仓量超过持仓量处理，0为不处理，1为撤单后再发单，2为转换为开仓；<br>
1，备用</p>
<hr>
<h3 id="5-行情源选择">5、行情源选择 </h3>
<p>关于设置中行情源选择：参数含义：0为天擎，1为自编行情，mdapi，2为gaoapi，一般都选择天勤，比较稳定。</p>
<hr>
<h3 id="6-算法交易各种参数说明">6、算法交易各种参数说明 </h3>
<p>6.1、说明：最后一位参数为算法交易种类选择，0为平均拆分下单，1为根据盘口下单，2为按时间均匀下单，3为所有账户单量加起来来按单位固定时间下单，4为所有账户在单位时间内下完单,所有账户一起下单，最后一位大于等于88为不启用算法</p>
<p>6.2、算法0各参数依次为，大于多少手执行算法、间隔下单时间、每次下多少手、算法编号，88为不启用算法</p>
<p>6.3、算法1各参数依次为，大于多少手执行算法、间隔下单时间、每次下单根据盘口量的百分之几、、算法编号，88为不启用算法</p>
<p>6.4、算法2各参数依次为，大于多少手执行算法、多少秒内下完、每次下多少手、算法编号，88为不启用算法</p>
<p>6.5、算法3各参数依次为，大于多少手执行算法、间隔下单时间、每次下多少手、多少个账户一起下单、是否启动该算法，注意：此算法只用于集中下单策略，不能用于手工下单等</p>
<p>6.6、算法4各参数依次为，大于多少手执行算法、每单给多少秒用于计算总时间、每次下多少手、、算法编号，88为不启用算法</p>
<p>6.7、算法5各参数依次为，大于多少手执行算法、多少秒时间内下完单，此参数等于在策略中根据条件计算的下单总时间、每次下多少手（改为开始隔多少秒开始下单）、算法编号，88为不启用算法</p>
<p>6.8、算法6各参数依次为，被动（唐试）挂单被动成交算法-未完成，现在可以测试不能实盘（测试中）</p>
<hr>
<h3 id="7-批量下单其他功能参数说明">7、批量下单其他功能参数说明 </h3>
<p>7.1、委托偏移跳数，可以为负数。参数含义：为委托偏移的跳数；</p>
<p>7.2、下单时间确定，0为收盘下单，1为夜盘下单，2为白盘下单排除夜盘品种，3为开盘下单，4为新下单表2，合并主工作区中和批量下单相同下单的数量。如果设置为88，者为选择对应编号的账户作为基准仓位（账户编号填在数据库表名列），用于跟踪账户下单策略监控同步用，如下图设置：</p>
<p>这样的设置表示，用0号账户的仓位作为基准仓位，1号账户为监控账户；<br>
<img src="img/%E6%89%B9%E9%87%8F%E4%B8%8B%E5%8D%95.png" alt="在这里插入图片描述"></p>
<p>7.3、刷新数据库仓位时判断是否收取数据表表和是否合并对冲仓位，0为不获取，1为获取数据不对冲仓位，2为获取并对冲仓位，3为对冲仓位数据基准（占时没有用），66为账户结束标志，以此判断进行仓位合并；</p>
<p>7.4、下单价格基准，参数含义：0为最新价，1为对手价，2为排队价，大于8为指定价，指定价格为jiaoyishezhi[8][3]。</p>
<hr>
<h3 id="8-tick驱动传入的tick数据和gongju模块duquredis_hq函数读取的tick数据格式">8、tick驱动传入的tick数据和gongju模块DuquRedis_HQ函数读取的tick数据格式 </h3>
<pre data-role="codeBlock" data-info="python" class="language-python python"><code><span class="token punctuation">{</span><span class="token string">'DateTime'</span><span class="token punctuation">:</span> <span class="token string">'20230915113000'</span><span class="token punctuation">,</span> <span class="token string">'TradingDay'</span><span class="token punctuation">:</span> <span class="token number">20230915</span><span class="token punctuation">,</span> <span class="token string">'Symbol'</span><span class="token punctuation">:</span> <span class="token string">'IF2310.'</span><span class="token punctuation">,</span> <span class="token string">'InstrumentID'</span><span class="token punctuation">:</span> <span class="token string">'IF2310'</span><span class="token punctuation">,</span> <span class="token string">'LastPrice'</span><span class="token punctuation">:</span> <span class="token number">3742.0</span><span class="token punctuation">,</span> 
<span class="token string">'Volume'</span><span class="token punctuation">:</span> <span class="token number">41918.0</span><span class="token punctuation">,</span> <span class="token string">'Turnover'</span><span class="token punctuation">:</span> <span class="token number">47074422480.0</span><span class="token punctuation">,</span> <span class="token string">'OpenInterest'</span><span class="token punctuation">:</span> <span class="token number">89617.0</span><span class="token punctuation">,</span> <span class="token string">'AveragePrice'</span><span class="token punctuation">:</span> <span class="token number">1123012.1303497304</span><span class="token punctuation">,</span> <span class="token string">'OpenPrice'</span><span class="token punctuation">:</span> <span class="token number">3748.8</span><span class="token punctuation">,</span> 
<span class="token string">'HighestPrice'</span><span class="token punctuation">:</span> <span class="token number">3757.0</span><span class="token punctuation">,</span> <span class="token string">'LowestPrice'</span><span class="token punctuation">:</span> <span class="token number">3726.2</span><span class="token punctuation">,</span> <span class="token string">'ClosePrice'</span><span class="token punctuation">:</span> <span class="token number">0.0</span><span class="token punctuation">,</span> <span class="token string">'SettlementPrice'</span><span class="token punctuation">:</span> <span class="token number">0.0</span><span class="token punctuation">,</span> <span class="token string">'UpperLimitPrice'</span><span class="token punctuation">:</span> <span class="token number">4107.6</span><span class="token punctuation">,</span> 
<span class="token string">'LowerLimitPrice'</span><span class="token punctuation">:</span> <span class="token string">'3360.8'</span><span class="token punctuation">,</span> <span class="token string">'PreClosePrice'</span><span class="token punctuation">:</span> <span class="token number">3742.0</span><span class="token punctuation">,</span> <span class="token string">'PreSettlementPrice'</span><span class="token punctuation">:</span> <span class="token number">3734.2</span><span class="token punctuation">,</span> <span class="token string">'PreOpenInterest'</span><span class="token punctuation">:</span> <span class="token number">80947.0</span><span class="token punctuation">,</span> 
<span class="token string">'BidsJ'</span><span class="token punctuation">:</span> <span class="token number">3741.8</span><span class="token punctuation">,</span> <span class="token string">'BidsL'</span><span class="token punctuation">:</span> <span class="token number">3.0</span><span class="token punctuation">,</span> <span class="token string">'AsksJ'</span><span class="token punctuation">:</span> <span class="token number">3742.6</span><span class="token punctuation">,</span> <span class="token string">'AsksL'</span><span class="token punctuation">:</span> <span class="token number">1.0</span><span class="token punctuation">,</span> <span class="token string">'BidsL2'</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">'AsksJ2'</span><span class="token punctuation">:</span> <span class="token number">6020.0</span><span class="token punctuation">,</span> <span class="token string">'AsksL2'</span><span class="token punctuation">:</span> <span class="token number">2</span><span class="token punctuation">,</span> 
<span class="token string">'BidsJ3'</span><span class="token punctuation">:</span> <span class="token number">5950.0</span><span class="token punctuation">,</span> <span class="token string">'BidsL3'</span><span class="token punctuation">:</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token string">'AsksJ3'</span><span class="token punctuation">:</span> <span class="token number">6025.0</span><span class="token punctuation">,</span> <span class="token string">'AsksL3'</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">'BidsJ4'</span><span class="token punctuation">:</span> <span class="token number">5941.0</span><span class="token punctuation">,</span> <span class="token string">'BidsL4'</span><span class="token punctuation">:</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token string">'AsksJ4'</span><span class="token punctuation">:</span> <span class="token number">6028.0</span><span class="token punctuation">,</span> <span class="token string">'AsksL4'</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span> 
<span class="token string">'BidsJ5'</span><span class="token punctuation">:</span> <span class="token number">5940.0</span><span class="token punctuation">,</span> <span class="token string">'BidsL5'</span><span class="token punctuation">:</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token string">'AsksJ5'</span><span class="token punctuation">:</span> <span class="token number">6030.0</span><span class="token punctuation">,</span> <span class="token string">'AsksL5'</span><span class="token punctuation">:</span> <span class="token number">5</span><span class="token punctuation">}</span>
</code></pre><hr>
<h3 id="9-交易接口返回tick数据字段说明">9、交易接口返回tick数据字段说明 </h3>
<pre data-role="codeBlock" data-info="c++" class="language-cpp c++"><code>    <span class="token comment">///申买价一</span>
    TThostFtdcPriceType  BidsJ<span class="token punctuation">;</span>
    <span class="token comment">///申买量一</span>
    TThostFtdcVolumeType BidsL<span class="token punctuation">;</span>
    <span class="token comment">///申卖价一</span>
    TThostFtdcPriceType  AsksJ<span class="token punctuation">;</span>
    <span class="token comment">///申卖量一</span>
    TThostFtdcVolumeType AsksL<span class="token punctuation">;</span>
    <span class="token comment">///申买价二</span>
    TThostFtdcPriceType  BidsJ2<span class="token punctuation">;</span>
    <span class="token comment">///申买量二</span>
    TThostFtdcVolumeType BidsL2<span class="token punctuation">;</span>
    <span class="token comment">///申卖价二</span>
    TThostFtdcPriceType  AsksJ2<span class="token punctuation">;</span>
    <span class="token comment">///申卖量二</span>
    TThostFtdcVolumeType AsksL2<span class="token punctuation">;</span>
    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>

    <span class="token comment">///交易日</span>
    TThostFtdcDateType   TradingDay<span class="token punctuation">;</span>
    <span class="token comment">///合约代码</span>
    TThostFtdcInstrumentIDType  InstrumentID<span class="token punctuation">;</span>
    <span class="token comment">///交易所代码</span>
    TThostFtdcExchangeIDType ExchangeID<span class="token punctuation">;</span>
    <span class="token comment">///合约在交易所的代码</span>
    TThostFtdcExchangeInstIDType    ExchangeInstID<span class="token punctuation">;</span>
    <span class="token comment">///最新价</span>
    TThostFtdcPriceType  LastPrice<span class="token punctuation">;</span>
    <span class="token comment">///上次结算价</span>
    TThostFtdcPriceType  PreSettlementPrice<span class="token punctuation">;</span>
    <span class="token comment">///昨收盘</span>
    TThostFtdcPriceType  PreClosePrice<span class="token punctuation">;</span>
    <span class="token comment">///昨持仓量</span>
    TThostFtdcLargeVolumeType   PreOpenInterest<span class="token punctuation">;</span>
    <span class="token comment">///今开盘</span>
    TThostFtdcPriceType  OpenPrice<span class="token punctuation">;</span>
    <span class="token comment">///最高价</span>
    TThostFtdcPriceType  HighestPrice<span class="token punctuation">;</span>
    <span class="token comment">///最低价</span>
    TThostFtdcPriceType  LowestPrice<span class="token punctuation">;</span>
    <span class="token comment">///数量</span>
    TThostFtdcVolumeType Volume<span class="token punctuation">;</span>
    <span class="token comment">///成交金额</span>
    TThostFtdcMoneyType  Turnover<span class="token punctuation">;</span>
    <span class="token comment">///持仓量</span>
    TThostFtdcLargeVolumeType   OpenInterest<span class="token punctuation">;</span>
    <span class="token comment">///今收盘</span>
    TThostFtdcPriceType  ClosePrice<span class="token punctuation">;</span>
    <span class="token comment">///本次结算价</span>
    TThostFtdcPriceType  SettlementPrice<span class="token punctuation">;</span>
    <span class="token comment">///涨停板价</span>
    TThostFtdcPriceType  UpperLimitPrice<span class="token punctuation">;</span>
    <span class="token comment">///跌停板价</span>
    TThostFtdcPriceType  LowerLimitPrice<span class="token punctuation">;</span>

</code></pre>
      </div>
      
      
    
    
    
    
    
    
  
    </body></html>